package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:30 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductVersionScopeBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductVersionScope productVersionScope;

  protected BeanMap getBeanMap() {

    return new BeanMap(productVersionScope);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductVersionScopeDAO.Id);

    mappedDaoFields.put(
        "productVersionId",
        com.ourteam.product.requirement.dao.IProductVersionScopeDAO.ProductVersionId);

    mappedDaoFields.put(
        "scopeName", com.ourteam.product.requirement.dao.IProductVersionScopeDAO.ScopeName);

    mappedDaoFields.put(
        "scopePriority", com.ourteam.product.requirement.dao.IProductVersionScopeDAO.ScopePriority);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductVersionScopeDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductVersionScopeDAO.Remarks);

    mappedDaoFields.put(
        "productVersionName",
        com.ourteam.product.requirement.dao.IProductVersionScopeDAO.ProductVersionName);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductVersionScopeBean() {
    super();

    this.productVersionScope = new com.ourteam.product.requirement.dao.ProductVersionScope();
  }

  public ProductVersionScopeBean(
      com.ourteam.product.requirement.dao.ProductVersionScope productVersionScope) {
    super();

    this.productVersionScope = productVersionScope;
  }

  public com.ourteam.product.requirement.dao.ProductVersionScope convertToProductVersionScope() {
    return this.productVersionScope;
  }

  public com.ourteam.product.requirement.dao.ProductVersionScope convertTo() {
    return this.productVersionScope;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productVersionScope.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productVersionScope.setId(id);
  }

  /**
   * Get productVersionId
   *
   * @return long
   */
  public long getProductVersionId() {
    return (long) this.productVersionScope.getProductVersionId();
  }

  /**
   * Set productVersionId
   *
   * @parameter long
   */
  public void setProductVersionId(long productVersionId) {

    this.productVersionScope.setProductVersionId(productVersionId);
  }

  /**
   * Get scopeName
   *
   * @return String
   */
  public String getScopeName() {
    return (String) this.productVersionScope.getScopeName();
  }

  /**
   * Set scopeName
   *
   * @parameter String
   */
  public void setScopeName(String scopeName) {

    this.productVersionScope.setScopeName(scopeName);
  }

  /**
   * Get scopePriority
   *
   * @return int
   */
  public int getScopePriority() {
    return (int) this.productVersionScope.getScopePriority();
  }

  /**
   * Set scopePriority
   *
   * @parameter int
   */
  public void setScopePriority(int scopePriority) {

    this.productVersionScope.setScopePriority(scopePriority);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productVersionScope.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productVersionScope.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productVersionScope.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productVersionScope.setRemarks(remarks);
  }

  /**
   * Get productVersionName
   *
   * @return String
   */
  public String getProductVersionName() {

    return (String) this.productVersionScope.getProductVersionName();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductVersionScopeBean) == false) {
      return false;
    } // end if

    ProductVersionScopeBean other = (ProductVersionScopeBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductVersionScope tempProductVersionScope =
        other.convertToProductVersionScope();

    if (tempProductVersionScope == null || this.productVersionScope == null) {
      isEqual = false;
    } else if (tempProductVersionScope == this.productVersionScope
        || tempProductVersionScope.equals(this.productVersionScope)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductVersionScopeBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionScope[] aProductVersionScopes) {

    return toArray(aProductVersionScopes, null);
  }

  public static ProductVersionScopeBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionScope[] aProductVersionScopes,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductVersionScopes)) {
      return new ProductVersionScopeBean[0];
    }

    int length = aProductVersionScopes.length;

    ProductVersionScopeBean[] beans = new ProductVersionScopeBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductVersionScopeBean(aProductVersionScopes[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductVersionScopes[i]});
      }
    }

    return beans;
  }
}
